package com.example.demo.event;

import com.example.demo.dbo.User;
import com.example.demo.mapper.DeptMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @program: demo
 * @description:
 * @author: Mr.Wang
 * @create: 2020-04-28 13:16
 **/
@Component
public class SmsImpl implements ApplicationListener<OrderEvent> {

    //@Autowired
    //private DeptMapper deptMapper;


    @Override
    public void onApplicationEvent(OrderEvent orderEvent) {
        System.out.println("同时插入dept");
        //deptMapper.insert(orderEvent);
    }
}
